<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page import="baratopradedeu.Cupom" %>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'cupom.label', default: 'Cupom')}" />
  <title><g:message code="default.enviado.label" args="[entityName]" /></title>
</head>
</head>
<body>
  <div class="body">
    <!--<h1><g:message code="default.create.label" args="[entityName]" /></h1>-->
    <h2>Cupom enviado com sucesso!</h2>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${cupomInstance}">
      <div class="errors">
        <g:renderErrors bean="${cupomInstance}" as="list" />
      </div>
    </g:hasErrors>


    <g:form >
      <g:hiddenField name="cupomId" value="${cupomId}" />
	  <g:hiddenField name="pedido.id" value="${cupomInstance?.pedido?.id}" />
	  <g:hiddenField name="cliente.id" value="${cupomInstance?.cliente?.id}" />
 
		<div class="dialog">
			<table>
				<tbody>
				
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="cliente">Codigo do cupom</label>
						</td>
						<td valign="top" class="value">
							${fieldValue(bean: cupomInstance, field: "id")}            
						</td>
					</tr>
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="cliente"><g:message code="cupom.cliente.label" default="Cliente" /></label>
						</td>
						<td valign="top" class="value">
							${fieldValue(bean: cupomInstance, field: "cliente")}            
						</td>
					</tr>
				
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="dataCompra"><g:message code="cupom.dataCompra.label" default="Data Compra" /></label>
						</td>
						<td valign="top" class="value">                                    
							${fieldValue(bean: cupomInstance, field: "dataCompra")}
						</td>
					</tr>
				
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="dataValidade"><g:message code="cupom.dataValidade.label" default="Data Validade" /></label>
						</td>
						<td valign="top" class="value">
							${fieldValue(bean: cupomInstance, field: "dataValidade")}                                    
						</td>
					</tr>
				
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="oferta"><g:message code="cupom.oferta.label" default="Oferta" /></label>
						</td>
						<td valign="top" class="value">
							${fieldValue(bean: cupomInstance, field: "oferta")}
						</td>
					</tr>
				
					
				
					<tr class="prop">
						<td valign="top" class="name">
						  <label for="statusCupom"><g:message code="cupom.statusCupom.label" default="Status Cupom" /></label>
						</td>
						<td valign="top" class="value ${hasErrors(bean: cupomInstance, field: 'statusCupom', 'errors')}">
							<g:checkBox name="statusCupom" value="${cupomInstance?.statusCupom}" />
						</td>
					</tr>
				
				</tbody>
			</table>         
		</div>
		<div class="buttons">
		<span class="button"><g:actionSubmit class="edit" action="verOfertas" value="${message(code: 'oferta.list.label', default: 'Retornar')}" /></span>
		</div>
	</g:form>
      
  </div>
</body>
</html>
